package itheima.d05;

import itheima.d05.exception.BaseException;
import itheima.d05.exception.PasswordEditFailedException;
import itheima.d05.exception.PasswordErrorException;

import javax.security.auth.login.AccountNotFoundException;

public class ATMtset {
    public static void main(String[] args) throws AccountNotFoundException {
        ATM atm = new ATM();
        while (true) {
            try{
                atm.start();
                break;
            }catch (AccountNotFoundException e) {
                System.out.println(e.getMessage());
                System.out.println("记录文件中/数据库中......");

            }catch (PasswordErrorException e){
                System.out.println(e.getMessage());
                System.out.println("记录文件中/数据库中......");



            }catch (Exception e){
                System.out.println("Sorry,给您添麻烦了，系统异常，请稍后再试！");
                System.out.println("记录文件中/数据库中......");
                System.out.println("通知运维人员，紧急修复......");
            }
        }


    }
}
